﻿package mortal.game.utils
{
    import Message.DB.Tables.*;
    import Message.Game.*;
    import Message.Public.*;
    import com.gengine.utils.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.common.tools.*;
    import mortal.game.cache.*;
    import mortal.game.manager.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.view.common.util.*;
    import mortal.game.view.mount.data.*;
    import mortal.game.view.palyer.data.*;

    public class ItemsUtil extends Object
    {
        public var itemPoint:SPoint;
        public static var CoinIcoUrl:String = "CoinIco1.jpg";
        public static var MagicWeaponScoreTimes:Array = [1.00001, 1.00001, 1.00001, 1.00001, 1.50001, 2.30001, 3.50001];

        public function ItemsUtil()
        {
            this.itemPoint = new SPoint();
            return;
        }// end function

        public static function getBindCode(param1:int) : int
        {
            var _loc_2:* = ItemConfig.instance.getConfig(param1);
            if (_loc_2 == null || _loc_2.bind == 1)
            {
                return param1;
            }
            return _loc_2.codeUnbind;
        }// end function

        public static function getUnbindCode(param1:int) : int
        {
            var _loc_2:* = ItemConfig.instance.getConfig(param1);
            if (_loc_2 == null || _loc_2.bind == 0)
            {
                return param1;
            }
            return _loc_2.codeUnbind;
        }// end function

        public static function isTaskItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupTask;
        }// end function

        public static function isCanDestroy(param1:ItemData) : Boolean
        {
            return !isTaskItem(param1);
        }// end function

        public static function isBind(param1:ItemData) : Boolean
        {
            if (param1 == null)
            {
                return false;
            }
            if (param1.isForceShowBind)
            {
                return true;
            }
            if (param1.itemInfo.bind == 1)
            {
                return true;
            }
            if (param1.extInfo != null)
            {
                if (param1.extInfo.bd == 1)
                {
                    return true;
                }
                if (param1.extInfo.bd == 2)
                {
                    return false;
                }
                return false;
            }
            return false;
        }// end function

        public static function isMountEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropMountEquip;
        }// end function

        public static function isPetEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropPet2Equip;
        }// end function

        public static function isFashionEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && (param1.itemInfo.category == EProp._EPropFashionClothesEquip || param1.itemInfo.category == EProp._EPropFashionWingEquip || param1.itemInfo.category == EProp._EPropFashionWeaponEquip || param1.itemInfo.category == EProp._EPropFashionFightSoulEquip || param1.itemInfo.category == EProp._EPropFashionFightMethodEquip || param1.itemInfo.category == EProp._EPropFashionDragonSoulEquip || param1.itemInfo.category == EProp._EPropFashionHolyBookEquip || param1.itemInfo.category == EProp._EPropFashionWarShieldEquip || param1.itemInfo.category == EProp._EPropFashionMonsterSoulEquip);
        }// end function

        public static function isWizardEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropSpriteEquip;
        }// end function

        public static function isTotemEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDrop && param1.itemInfo.category == EProp._EPropPetTotem && param1.itemInfo.type == EPropPetTotemType._EPropPetTotemPropEquip;
        }// end function

        public static function isMountAdvanced(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceMountAdvanced;
        }// end function

        public static function isMountGrouth(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypeMountGrowth;
        }// end function

        public static function isMountTalent(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypeMountTalent;
        }// end function

        public static function isPetGrouth(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet2Growth;
        }// end function

        public static function isPetTalent(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet2Talent;
        }// end function

        public static function isPetSoul(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypePetSkillRand;
        }// end function

        public static function isPetDirect(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePetDirect;
        }// end function

        public static function isHalidom(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffHalidom && param1.itemInfo.type == EAdvanceType._EAdvanceTypeHalidom;
        }// end function

        public static function isFlyBoot(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeConvey;
        }// end function

        public static function isRevivalProp(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeRevival;
        }// end function

        public static function isGiftBag(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag;
        }// end function

        public static function getItemWholeName(param1:ItemData, param2:Boolean = false, param3:int = 0, param4:Boolean = false, param5:int = 0) : String
        {
            var _loc_8:DefInfo = null;
            var _loc_9:String = null;
            var _loc_10:String = null;
            var _loc_11:String = null;
            var _loc_6:String = "";
            var _loc_7:* = param5;
            if (param1.extInfo != null)
            {
                _loc_8 = GameDefConfig.instance.getEPrefixx(param1.extInfo.qual);
                _loc_7 = param1.extInfo.strengthen;
            }
            if (param5 > 0)
            {
                _loc_7 = param5;
            }
            if (param3 == 0)
            {
                _loc_9 = "[";
                _loc_10 = "]";
            }
            else
            {
                _loc_9 = "【";
                _loc_10 = "】";
            }
            if (param2)
            {
                if (param4 && _loc_8)
                {
                    _loc_6 = HTMLUtil.addColor(_loc_9 + _loc_8.text + _loc_10 + " ", _loc_8.text1);
                }
                if (_loc_7 > 0)
                {
                    _loc_11 = ColorConfig.instance.getItemColorString(param1.itemInfo.color);
                    if (param3 == 0)
                    {
                        _loc_6 = _loc_6 + HTMLUtil.addColor(param1.itemInfo.name + _loc_9 + "+" + _loc_7 + _loc_10, _loc_11);
                    }
                    if (param3 == 1)
                    {
                        _loc_6 = _loc_6 + HTMLUtil.addColor(param1.itemInfo.name, _loc_11);
                        _loc_6 = _loc_6 + HTMLUtil.addColor(_loc_9 + "+" + _loc_7 + _loc_10, GlobalStyle.colorHuang2);
                    }
                }
                else
                {
                    _loc_6 = _loc_6 + param1.itemInfo.htmlName;
                }
            }
            else
            {
                if (param4 && _loc_8)
                {
                    _loc_6 = _loc_9 + _loc_8.text + _loc_10;
                }
                if (!param1.itemInfo)
                {
                    return Language.getString(20697);
                }
                _loc_6 = _loc_6 + param1.itemInfo.name;
                if (_loc_7 > 0)
                {
                    _loc_6 = _loc_6 + (_loc_9 + "+" + _loc_7 + _loc_10);
                }
            }
            return _loc_6;
        }// end function

        public static function getItemName(param1:ItemData, param2:String = "{0}", param3:Boolean = false) : String
        {
            var _loc_4:String = "";
            if (param1)
            {
                _loc_4 = param2.replace("{0}", param1.itemInfo.name);
            }
            if (param3 && ItemsUtil.isOtherEquip(param1) && param1.itemInfo.itemLevel)
            {
                _loc_4 = _loc_4 + ("[+" + param1.itemInfo.itemLevel + "]");
            }
            _loc_4 = HTMLUtil.addColor(_loc_4, ColorConfig.instance.getItemColor(param1.itemInfo.color).color);
            return _loc_4;
        }// end function

        public static function getItemNameAndAmount(param1:ItemData) : String
        {
            var _loc_2:String = "";
            if (param1)
            {
                _loc_2 = HTMLUtil.addColor(param1.name + "×" + param1.itemAmount, ColorConfig.instance.getItemColor(param1.itemInfo.color).color);
            }
            return _loc_2;
        }// end function

        public static function isPetSkillBook(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet;
        }// end function

        public static function isPetAdvanced(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePetGrowth;
        }// end function

        public static function isPlayerSkillBook(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            var _loc_3:TSkill = null;
            if (param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePlayer)
            {
                _loc_3 = SkillConfig.instance.getInfoById(param1.itemInfo.effect);
                if (_loc_3 && _loc_3.posType < 1000)
                {
                    _loc_2 = true;
                }
            }
            return _loc_2;
        }// end function

        public static function isOtherSkillBook(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            var _loc_3:TSkill = null;
            if (param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePlayer)
            {
                _loc_3 = SkillConfig.instance.getInfoById(param1.itemInfo.effect);
                if (_loc_3 && _loc_3.posType > 30000)
                {
                    _loc_2 = true;
                }
            }
            return _loc_2;
        }// end function

        public static function getSkillTypeByItemData(param1:ItemData) : int
        {
            var _loc_2:int = 0;
            var _loc_3:int = 0;
            var _loc_4:TSkill = null;
            if (param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance)
            {
                _loc_3 = param1.itemInfo.effect;
                _loc_4 = SkillConfig.instance.getInfoById(_loc_3);
                if (_loc_4)
                {
                    _loc_2 = GameDefConfig.instance.getOtherSkillTypeByPosType(_loc_4.posType);
                }
            }
            return _loc_2;
        }// end function

        public static function isClothes(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropEquip && param1.itemInfo.type == EEquip._EEquipClothes;
        }// end function

        public static function isEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropEquip;
        }// end function

        public static function isHalidomEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGodHeadEquip;
        }// end function

        public static function isOtherEquip(param1:ItemData) : Boolean
        {
            if (isSpriteEquip(param1) || isMountEquip(param1) || isFashionEquip(param1) || isPetEquip(param1))
            {
                return true;
            }
            return false;
        }// end function

        public static function isEquipByItemInfo(param1:ItemInfo) : Boolean
        {
            return param1.group == EGroup._EGroupProp && param1.category == EProp._EPropEquip;
        }// end function

        public static function isSpriteEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropSpriteEquip;
        }// end function

        public static function isDefenseEquip(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDenfenseCopy && param1.itemInfo.category == EDefenseCopyCategory._EPropDefenseCopyEquip;
        }// end function

        public static function isDefenseItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDenfenseCopy && (param1.itemInfo.category == EDefenseCopyCategory._EPropDefenseCopy || param1.itemInfo.category == EDefenseCopyCategory._EStuffDefenseCopy);
        }// end function

        public static function isDefenseItemCompose(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDenfenseCopy && param1.itemInfo.category == EDefenseCopyCategory._EPropDefenseCopy && param1.itemInfo.type == EPropDefenseCopyType._EPropDefenseCopyPropComposeScroll;
        }// end function

        public static function isDefenseItemCanUse(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDenfenseCopy && param1.itemInfo.category == EDefenseCopyCategory._EPropDefenseCopy;
        }// end function

        public static function isBelongToDefense(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupDenfenseCopy;
        }// end function

        public static function getEquipStrengthen(param1:ItemData) : int
        {
            var _loc_2:int = 0;
            return _loc_2;
        }// end function

        public static function isSameItemData(param1:ItemData, param2:ItemData) : Boolean
        {
            if (param1 && param2 && param1.itemCode == param2.itemCode)
            {
                return true;
            }
            return false;
        }// end function

        public static function isSameTypeItem(param1:ItemData, param2:ItemData) : Boolean
        {
            if (param1 && param2)
            {
                if (param1.itemInfo.group == param2.itemInfo.group && param1.itemInfo.category == param2.itemInfo.category && param1.itemInfo.type == param2.itemInfo.type)
                {
                    return true;
                }
            }
            return false;
        }// end function

        public static function isOverdueItem(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            var _loc_3:* = param1.extInfo;
            var _loc_4:int = -1;
            var _loc_5:* = ClockManager.instance.nowDate;
            if (_loc_3 && _loc_3.fashEffDay)
            {
                _loc_4 = int(_loc_3.fashEffDay);
                if (_loc_5.time / (1000 * 60 * 60 * 24) > _loc_4)
                {
                    _loc_2 = true;
                }
            }
            return _loc_2;
        }// end function

        public static function isOverdueByConfig(param1:ItemInfo) : Boolean
        {
            var _loc_4:int = 0;
            var _loc_2:* = param1.beginDate.time;
            var _loc_3:* = param1.endDate.time;
            if (_loc_2 == _loc_3)
            {
                return false;
            }
            _loc_4 = ClockManager.instance.nowDate.time;
            if (_loc_4 >= _loc_2 && _loc_4 < _loc_3)
            {
                return false;
            }
            return true;
        }// end function

        public static function isCanSell(param1:ItemData) : Boolean
        {
            return param1.itemInfo.sell == ESell._ESellYes && (!isPrescriptionItem(param1) || isPrescriOutTime(param1));
        }// end function

        public static function isNormalJewel(param1:ItemData) : Boolean
        {
            return false;
        }// end function

        public static function isSpecialJewel(param1:ItemData) : Boolean
        {
            return false;
        }// end function

        public static function isNotCanUse(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.useType == EItemUseType._EItemUseTypeCanNotUse);
        }// end function

        public static function isEnoughLevel(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.level <= Cache.instance.role.entityInfo.level);
        }// end function

        public static function isFitCarrer(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.career == 0 || param1.itemInfo.career == 256 || param1.itemInfo.career & Cache.instance.role.entityInfo.career);
        }// end function

        public static function isCanUseInBag(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.useType & EItemUseType._EItemUseTypeUseInBag);
        }// end function

        public static function isLimitUseTimesItem(param1:ItemData) : Boolean
        {
            if (isLimitUseTimeExpDrug(param1))
            {
                return true;
            }
            return false;
        }// end function

        public static function isLimitUseTimeExpDrug(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == 15);
        }// end function

        public static function isDrugLife(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugLife);
        }// end function

        public static function isDrugMana(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugMana);
        }// end function

        public static function isDrugPetLife(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugPetLife);
        }// end function

        public static function isDrugLifeBag(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugLifeBag);
        }// end function

        public static function isDrugManaBag(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugManaBag);
        }// end function

        public static function isDrugPetLifespan(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropDrug && param1.itemInfo.type == EDrug._EDrugPetLifespan);
        }// end function

        public static function isLefeAndManaAndPetLifeDrug(param1:ItemData) : Boolean
        {
            if (param1.itemInfo.group != EGroup._EGroupProp || param1.itemInfo.category != EProp._EPropDrug)
            {
                return false;
            }
            if (param1.itemInfo.type == EDrug._EDrugLife || param1.itemInfo.type == EDrug._EDrugMana || param1.itemInfo.type == EDrug._EDrugLifeInstant || param1.itemInfo.type == EDrug._EDrugManaInstant)
            {
                return true;
            }
            return false;
        }// end function

        public static function isDrug(param1:ItemData) : Boolean
        {
            if (param1.itemInfo.group != EGroup._EGroupProp || param1.itemInfo.category != EProp._EPropDrug)
            {
                return false;
            }
            return true;
        }// end function

        public static function isDrugByItemInfo(param1:ItemInfo) : Boolean
        {
            if (param1.group != EGroup._EGroupProp || param1.category != EProp._EPropDrug)
            {
                return false;
            }
            return true;
        }// end function

        public static function isCanBulkUse(param1:ItemData) : Boolean
        {
            return param1.serverData.itemAmount > 1 && param1.itemInfo.useType & EItemUseType._EItemUseTypeCanBatchUse;
        }// end function

        public static function isPetUse(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.useType & EItemUseType._EItemUseTypePet);
        }// end function

        public static function isOpenFunc(param1:ItemData) : Boolean
        {
            return param1.itemInfo.useType == EItemUseType._EItemUseTypeSpecial;
        }// end function

        public static function isGetUse(param1:ItemData) : Boolean
        {
            return Boolean(param1.itemInfo.useType & EItemUseType._EItemUseTypeGet);
        }// end function

        public static function isRune(param1:ItemInfo) : Boolean
        {
            return param1.group == EGroup._EGroupProp && param1.category == EProp._EPropRune;
        }// end function

        public static function isPetEgg(param1:ItemInfo) : Boolean
        {
            return param1.group == EGroup._EGroupProp && param1.category == EProp._EPropProp && param1.type == EPropType._EPropTypePetEgg;
        }// end function

        public static function isEmbedGem(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.extInfo;
            if (_loc_2 == null)
            {
                return false;
            }
            var _loc_3:int = 1;
            while (_loc_3 <= 8)
            {
                
                if (_loc_2["h" + _loc_3] != "0" && _loc_2["h" + _loc_3] != null)
                {
                    return true;
                }
                _loc_3++;
            }
            return false;
        }// end function

        public static function isGuildDonation(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeGuildStone;
        }// end function

        public static function isStrengthTone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceStrengthTone;
        }// end function

        public static function isRefreshTone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceRefreshTone;
        }// end function

        public static function isRefreshLock(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceRefreshLock;
        }// end function

        public static function isColorStone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && (param1.itemInfo.type == EAdvanceType._EAdvanceTypeColorAttrMain || param1.itemInfo.type == EAdvanceType._EAdvanceTypeColorDefenMain || param1.itemInfo.type == EAdvanceType._EAdvanceTypeColorAtt);
        }// end function

        public static function isColorScroll(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EEquipColorScroll;
        }// end function

        public static function isHuanHunStone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePetSkillRefresh;
        }// end function

        public static function isQualityStone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeQualityPiece;
        }// end function

        public static function isJewel(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffJewel;
        }// end function

        public static function isJewelScroll(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EPropJewelScroll;
        }// end function

        public static function isSpriteStone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypeSprite;
        }// end function

        public static function isJewelMarrow(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypeJewelMarrow;
        }// end function

        public static function isSpiterActivate(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeActiveSoul;
        }// end function

        public static function isGuildNewChangeNameKa(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeGuildNameCard;
        }// end function

        public static function isChatTrumpet(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeTrumpet;
        }// end function

        public static function isChatCrossTrumpet(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeCrossTrumpet;
        }// end function

        public static function isZuandanPackage(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag && param1.itemInfo.type == EGiftBag._EGiftBagCost;
        }// end function

        public static function isGiftBagRollingCardItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag && param1.itemInfo.type == EGiftBag._EGiftBagFlop;
        }// end function

        public static function isMulSelBag(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag && param1.itemInfo.type == EGiftBag._EGiftBagMulSel;
        }// end function

        public static function isPetSkill1(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == 41 && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet && param1.itemInfo.effect == 31000001;
        }// end function

        public static function isPetSkill2(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == 41 && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet && param1.itemInfo.effect == 31010001;
        }// end function

        public static function isPetSkill3(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == 41 && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet && param1.itemInfo.effect == 32010001;
        }// end function

        public static function isPetSkill4(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == 41 && param1.itemInfo.type == EAdvanceType._EAdvanceTypePet && param1.itemInfo.effect == 32030001;
        }// end function

        public static function isTreasureMap(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeTreasureMap;
        }// end function

        public static function isOwnItem(param1:ItemData) : Boolean
        {
            var _loc_2:* = Cache.instance.pack.packRolePackCache.getItemDataByUid(param1.uid);
            var _loc_3:* = Cache.instance.pack.backPackCache.getItemDataByUid(param1.uid);
            if (isEquip(param1))
            {
                return _loc_3 == null && _loc_2 == null ? (false) : (true);
            }
            else
            {
                return _loc_3 == null ? (false) : (true);
            }
        }// end function

        public static function isFashionAdvanceProp(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && (param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionClothesUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWingUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWeaponUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightSoulUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightMethodUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionDragonSoulUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionHolyBookUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWarShieldUp || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionMonsterSoulUp);
        }// end function

        public static function isPetShapeCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypePetSharp;
        }// end function

        public static function isPrescriptionItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.prescription != 0;
        }// end function

        public static function isPrescriOutTime(param1:ItemData) : Boolean
        {
            var _loc_2:Date = null;
            var _loc_3:Date = null;
            var _loc_4:Date = null;
            if (isPrescriptionItem(param1))
            {
                if (param1.itemInfo.prescription == -1)
                {
                    return true;
                }
                if (param1.serverData && param1.serverData.createDt)
                {
                    _loc_2 = ClockManager.instance.nowDate;
                    if (param1.serverData)
                    {
                        if (param1.extInfo && param1.extInfo.app_dt)
                        {
                            _loc_3 = DateParser.strToDateNormal(param1.extInfo.app_dt);
                        }
                        else if (param1.serverData.createDt)
                        {
                            _loc_3 = param1.serverData.createDt;
                        }
                        else
                        {
                            _loc_3 = _loc_2;
                        }
                    }
                    else
                    {
                        _loc_3 = _loc_2;
                    }
                    if (param1.itemInfo.existTime)
                    {
                        _loc_4 = new Date(_loc_3.time + param1.itemInfo.existTime * 60 * 1000);
                    }
                    else
                    {
                        _loc_4 = new Date(_loc_3.fullYear, _loc_3.month, _loc_3.date + param1.itemInfo.prescription, 0, 0, 0);
                    }
                    return _loc_2.time > _loc_4.time;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }// end function

        public static function isGrowthStuff(param1:ItemData, param2:Boolean = true) : Boolean
        {
            if (param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && (param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWingGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionClothesGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWeaponGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightSoulGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightMethodGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionDragonSoulGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionHolyBookGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWarShieldGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionMonsterSoulGrowth || param1.itemInfo.type == EAdvanceType._EAdvanceTypeMountGrowth && param2 || param1.itemInfo.type == EAdvanceType._EAdvanceTypePet2Growth && param2))
            {
                return true;
            }
            return false;
        }// end function

        public static function getLotteryDrawLevel(param1:ItemData) : int
        {
            if (param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeLottery)
            {
                return param1.itemInfo.itemLevel;
            }
            return 0;
        }// end function

        public static function isTalentStuff(param1:ItemData, param2:Boolean = true) : Boolean
        {
            if (param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && (param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWingTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionClothesTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWeaponTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightSoulTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionFightMethodTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionDragonSoulTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionHolyBookTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionWarShieldTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeFashionMonsterSoulTalent || param1.itemInfo.type == EAdvanceType._EAdvanceTypeMountTalent && param2 || param1.itemInfo.type == EAdvanceType._EAdvanceTypePet2Talent && param2))
            {
                return true;
            }
            return false;
        }// end function

        public static function getGrowthTalentInfo(param1:ItemData) : GrowthTalentConsumeData
        {
            var _loc_3:FashionAdvanceData = null;
            var _loc_4:MountData = null;
            var _loc_5:int = 0;
            var _loc_6:Array = null;
            var _loc_7:Array = null;
            var _loc_2:* = new GrowthTalentConsumeData();
            if (isGrowthStuff(param1))
            {
                switch(param1.itemInfo.type)
                {
                    case EAdvanceType._EAdvanceTypeFashionClothesGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWingGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWeaponGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightSoulGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightMethodGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionDragonSoulGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionHolyBookGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWarShieldGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionMonsterSoulGrowth:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeMountGrowth:
                    {
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
                if (_loc_5 != 0)
                {
                    _loc_3 = Cache.instance.fashion.getFashionInfo(_loc_5);
                    if (_loc_3 && _loc_3.advanceInfo)
                    {
                        _loc_2.hasUseNum = _loc_3.advanceInfo.totalGrowthNum;
                        _loc_2.currMaxNum = _loc_3.baseInfo.maxUseGrowth;
                    }
                }
                else if (EAdvanceType._EAdvanceTypePet2Growth == param1.itemInfo.type)
                {
                    _loc_6 = Cache.instance.newPet.getPetAdvanceGrouthNum(param1);
                    _loc_2.hasUseNum = _loc_6[0];
                    _loc_2.currMaxNum = _loc_6[1];
                }
                else
                {
                    _loc_4 = Cache.instance.mount.mountData;
                    _loc_2.hasUseNum = _loc_4.sPublicMount.totalGrowthNum;
                    _loc_2.currMaxNum = _loc_4.tMountConfig.maxUseGrowth;
                }
            }
            else if (isTalentStuff(param1))
            {
                switch(param1.itemInfo.type)
                {
                    case EAdvanceType._EAdvanceTypeFashionClothesTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWingTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWeaponTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightSoulTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightMethodTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionDragonSoulTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionHolyBookTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWarShieldTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionMonsterSoulTalent:
                    {
                        _loc_5 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeMountTalent:
                    {
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
                if (_loc_5 != 0)
                {
                    _loc_3 = Cache.instance.fashion.getFashionInfo(_loc_5);
                    if (_loc_3 && _loc_3.advanceInfo)
                    {
                        _loc_2.hasUseNum = _loc_3.advanceInfo.totalTalentNum;
                        _loc_2.currMaxNum = _loc_3.baseInfo.maxUseTalent;
                    }
                }
                else if (EAdvanceType._EAdvanceTypePet2Talent == param1.itemInfo.type)
                {
                    _loc_7 = Cache.instance.newPet.getPetAdvanceTalentNum(param1);
                    _loc_2.hasUseNum = _loc_7[0];
                    _loc_2.currMaxNum = _loc_7[1];
                }
                else
                {
                    _loc_4 = Cache.instance.mount.mountData;
                    _loc_2.hasUseNum = _loc_4.sPublicMount.totalTalentNum;
                    _loc_2.currMaxNum = _loc_4.tMountConfig.maxUseTalent;
                }
            }
            return _loc_2;
        }// end function

        public static function isWizardSkill(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeSpriteSkill;
        }// end function

        public static function getGrowthItemGainAttr(param1:ItemData) : Array
        {
            var _loc_6:String = null;
            var _loc_7:AttributeData = null;
            var _loc_2:* = param1.itemInfo.effectEx;
            var _loc_3:* = PlayerTargetConfig.instance.getInfoById(_loc_2);
            var _loc_4:Array = [];
            var _loc_5:* = AttributeUtil.attrs.concat();
            _loc_5.splice(2, 1);
            _loc_5.splice(-1);
            for each (_loc_6 in _loc_5)
            {
                
                if (_loc_3[_loc_6] && _loc_3[_loc_6] != 0)
                {
                    _loc_7 = new AttributeData();
                    _loc_7.name = _loc_6;
                    _loc_7.value = _loc_3[_loc_6] as int;
                    _loc_4.push(_loc_7);
                }
            }
            return _loc_4;
        }// end function

        public static function isItemLevelInUse(param1:ItemData) : Boolean
        {
            return param1.itemInfo.itemLevel > 0;
        }// end function

        public static function isAllEquipType(param1:ItemData) : Boolean
        {
            return isEquip(param1) || isFashionEquip(param1) || isMountEquip(param1) || isSpriteEquip(param1) || isPetEquip(param1);
        }// end function

        public static function isMonetaryCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeMoney;
        }// end function

        public static function isWizardCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeMoney && param1.itemInfo.effect == EPriceUnit._EPriceUnitVitalEnergy;
        }// end function

        public static function sortItem(param1:ItemData, param2:ItemData) : int
        {
            if (!ItemsUtil.isPrescriptionItem(param1) && ItemsUtil.isPrescriptionItem(param2))
            {
                return 1;
            }
            if (ItemsUtil.isPrescriptionItem(param1) && !ItemsUtil.isPrescriptionItem(param2))
            {
                return -1;
            }
            if (param1.itemInfo.effect > param2.itemInfo.effect)
            {
                return -1;
            }
            if (param1.itemInfo.effect < param2.itemInfo.effect)
            {
                return 1;
            }
            if (param1.bind == EBind._EBindYes && param2.bind == EBind._EBindNo)
            {
                return -1;
            }
            return 1;
        }// end function

        public static function isAdvanceBlessItem(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            if (param1.itemInfo.effectEx == 1)
            {
                if (ItemsUtil.isMountAdvanced(param1) || ItemsUtil.isFashionAdvanceProp(param1) || ItemsUtil.isPetAdvanced(param1))
                {
                    _loc_2 = true;
                }
            }
            return _loc_2;
        }// end function

        public static function isAdvanceItemAndOver3Level(param1:ItemData) : Boolean
        {
            var _loc_3:int = 0;
            var _loc_4:* = undefined;
            var _loc_2:int = 3;
            if (ItemsUtil.isMountAdvanced(param1))
            {
                _loc_4 = Cache.instance.mount.mountData;
                if (_loc_4 is MountData)
                {
                    _loc_3 = (_loc_4 as MountData).mountLevel;
                }
            }
            else if (ItemsUtil.isFashionAdvanceProp(param1))
            {
                _loc_4 = Cache.instance.fashion.getFashionInfo(param1.itemInfo.type).advanceInfo;
                if (_loc_4 is SPublicFashion)
                {
                    _loc_3 = (_loc_4 as SPublicFashion).code;
                }
            }
            else if (ItemsUtil.isPetAdvanced(param1))
            {
                _loc_4 = Cache.instance.newPet;
                if (_loc_4 is SPublicPet2)
                {
                    _loc_3 = (_loc_4 as SPublicPet2).code;
                }
            }
            else
            {
                return false;
            }
            return _loc_3 >= _loc_2;
        }// end function

        public static function isVipExperienceCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeVip;
        }// end function

        public static function isFlower(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.itemInfo;
            return _loc_2.group == EGroup._EGroupProp && _loc_2.category == EProp._EPropFlower;
        }// end function

        public static function isEquipChip(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.itemInfo;
            return _loc_2.group == EGroup._EGroupProp && _loc_2.category == EProp._EPropProp && _loc_2.type == EPropType._EPropTypeEquipPiece;
        }// end function

        public static function isCollectExchangeItem(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.itemInfo;
            return _loc_2.group == EGroup._EGroupProp && _loc_2.category == EStuff._EStuffCollect && _loc_2.type == EAdvanceType._EAdvanceTypeCollect;
        }// end function

        public static function isDoubleElevenCollectExchangeItem(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.itemInfo;
            return _loc_2.group == EGroup._EGroupProp && _loc_2.category == EStuff._EStuffCollect && _loc_2.type == EAdvanceType._EAdvanceType1111Card;
        }// end function

        public static function isMedal(param1:ItemData) : Boolean
        {
            var _loc_2:* = param1.itemInfo;
            return _loc_2.group == EGroup._EGroupProp && _loc_2.category == EProp._EPropProp && _loc_2.type == EPropType._EPropTypeMedal;
        }// end function

        public static function isFixedGiftBag(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag && param1.itemInfo.type == EGiftBag._EGiftBagFix;
        }// end function

        public static function isMoneyCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropGiftBag && param1.itemInfo.type == EGiftBag._EGiftBagMoneyCard;
        }// end function

        public static function isCanUseMoneyCard(param1:ItemData) : Boolean
        {
            var _loc_2:* = Cache.instance.firstRecharge.moneyCardGetDay;
            var _loc_3:* = Cache.instance.rebate.rechargeSum;
            var _loc_4:* = param1.itemInfo.effectEx;
            return isMoneyCard(param1) && param1.itemInfo.feedMount == _loc_2 && _loc_3 >= _loc_4;
        }// end function

        public static function isAllRoundUpStone(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EStuffAdvance && param1.itemInfo.type == EAdvanceType._EAdvanceTypeAllRoundUp;
        }// end function

        public static function getGiftItemArr(param1:ItemData) : Array
        {
            var _loc_2:* = ItemConfig.instance.getConfig(param1.itemInfo.code) as ItemGiftBagInfo;
            var _loc_3:* = _loc_2.itemList1.split("&");
            return _loc_3;
        }// end function

        public static function isRenameCard(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeChangeName;
        }// end function

        public static function isActiveTitleItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeActiveTitle;
        }// end function

        public static function isSkillBookPiece(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeSkillPiece;
        }// end function

        public static function isGoldEquipPiece(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeGoldEquipPiece;
        }// end function

        public static function isGoldEquipScroll(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupStuff && param1.itemInfo.category == EStuff._EEquipColorScroll;
        }// end function

        public static function parseItemListData(param1:String) : Array
        {
            var _loc_2:Array = null;
            var _loc_5:String = null;
            var _loc_6:Array = null;
            var _loc_7:ItemListData = null;
            if (param1 == null || param1 == "")
            {
                return _loc_2;
            }
            _loc_2 = [];
            var _loc_3:* = param1.split("&");
            var _loc_4:int = 0;
            while (_loc_4 < _loc_3.length)
            {
                
                _loc_5 = _loc_3[_loc_4];
                _loc_6 = _loc_5.split("#");
                _loc_7 = new ItemListData();
                _loc_7.rewardType = parseInt(_loc_6[0]);
                _loc_7.code = parseInt(_loc_6[1]);
                _loc_7.num = parseInt(_loc_6[2]);
                if (_loc_6.length >= 4)
                {
                    _loc_7.pose = parseInt(_loc_6[3]);
                }
                if (_loc_6.length >= 5)
                {
                    _loc_7.price = parseInt(_loc_6[4]);
                }
                _loc_2.push(_loc_7);
                _loc_4++;
            }
            return _loc_2;
        }// end function

        public static function isExpCopyItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.group == EGroup._EGroupProp && param1.itemInfo.category == EProp._EPropProp && param1.itemInfo.type == EPropType._EPropTypeExpCopyCard;
        }// end function

        public static function isThanksgivingItem(param1:ItemData) : Boolean
        {
            return param1.itemInfo.code == 180140200 || param1.itemInfo.code == 180141200;
        }// end function

    }
}
